Skip to content

[Sync EN] strlen, strstr, strcasecmp, strncasecmp#44

Open
lacatoire wants to merge 3 commits intophp:masterfrom
lacatoire:sync-en/strings-compare-lookup
Open

[Sync EN] strlen, strstr, strcasecmp, strncasecmp#44
lacatoire wants to merge 3 commits intophp:masterfrom
lacatoire:sync-en/strings-compare-lookup

Conversation

@lacatoire
Copy link
Copy Markdown
Member

Sync of four widely-used string functions with upstream php/doc-en:

  • strlen, strstr: add PHP_EOL between echoes in examples (so the example actually prints something distinct each step)
  • strcasecmp, strncasecmp: use the shared `&strings.comparison.return;` entity for return values, which also fixes a stale '*' typo in strncasecmp.

lacatoire added 3 commits May 4, 2026 13:02
- strlen, strstr: add PHP_EOL between echoes in examples
- strcasecmp, strncasecmp: use the shared &strings.comparison.return; entity
  for return values (replaces a free-form description, also fixes a stale
  '*' typo in strncasecmp)
…eturn

The strings.comparison.return entity is not defined in
doc-tr/language-snippets.ent, so referencing it would either break the
build or leak English text. Restoring an inline Turkish description that
matches the upstream EN content (uses '0'dan küçük/büyük bir değer'
instead of the previous '-1'/'1', and corrects the stale '*' typo in
strncasecmp by spelling out '0').
The TR strings/* family (strcmp, strncmp, strnatcmp) all use
'<literal>-1</literal>; ... <literal>1</literal>; ... <literal>0</literal>'.
Reverting strcasecmp/strncasecmp to that exact wording for consistency.
The fix to the stale '*' typo in strncasecmp is preserved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant